var cf = cf || {};

cf.cart = {
	add: function(productId, number) {
		return $.post(
			'/cf/call/cart.add',
			{'productId':productId, 'amount':number}
		);
	},
	list: function() {
		return $.post('/cf/call/cart.getList');
	},
	del: function(productId) {
		return $.post('/cf/call/cart.del',{'productId':productId});
	},
	set_product: function(productId, number) {
		return $.post('/cf/call/cart.setproduct',{'productId':productId, 'number':number});
	}
};